//
//  UIScrollView+Utilities.m
//  SMStore
//
//  Created by JingGuo on 2017/9/8.
//  Copyright © 2017年 Smedia Education Technology Co., Ltd. All rights reserved.
//

#import "UIScrollView+Utilities.h"

@implementation UIScrollView (Utilities)

- (void)scrollToBottom {
    [self scrollToBottomAnimated:YES];
}

- (void)scrollToBottomAnimated:(BOOL)animated {
    CGPoint off = self.contentOffset;
    off.y = self.contentSize.height - self.bounds.size.height + self.contentInset.bottom;
    [self setContentOffset:off animated:animated];
}

@end
